<!-- 查询 content 列表 -->
{{ $selectList := selectList .q .pageNo "id,title,hrefURL,updateTime FROM content WHERE status=1 and categoryID=? order by sortNo desc" .urlPathParam }}
{{ $nav := selectOne "name FROM category WHERE id=?" .urlPathParam }}
{{ $site:=site }}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <title>{{ $nav.name }}</title>
  <meta name="description" content="{{ $site.description }}" />
  <meta name="keyword" content="{{ $site.keyword }}" />

{{template "bodystart.html"  }}

<section id="archive" class="archive">
  <div class="archive-title category">
        <h2 class="archive-name">{{$nav.name}}</h2>
  </div>
  {{ range $k,$v := $selectList.data }}
  <div class="archive-post">
      <span class="archive-post-time">
        {{ slice $v.updateTime 0 10 }} 
      </span>
      <span class="archive-post-title">
        <a href="{{basePath}}post/{{$v.id}}" class="archive-post-link">
          {{ $v.title }}
        </a>
      </span>
  </div>
  {{end}}
    
    
</section>
  
<nav class="pagination">
  {{ if $selectList.page.HasPrev }}
  <a class="prev" href="{{basePath}}category/{{.urlPathParam}}?pageNo={{ addInt $selectList.page.PageNo -1 }}&q={{.q}}">
      <i class="iconfont icon-left"></i>
      <span class="prev-text">上一页</span>
    </a>
  {{end}}
  {{ if $selectList.page.HasNext }}
  <a class="next" href="{{basePath}}category/{{.urlPathParam}}?pageNo={{ addInt $selectList.page.PageNo 1 }}&q={{.q}}">
      <span class="next-text">下一页</span>
      <i class="iconfont icon-right"></i>
    </a>
    {{end}}   
</nav>
        

  {{template "bodyend.html" }}